package cc.lj.internal.coupons.infrastructure.repository;

import cc.lj.internal.core.model.PageParam;
import cc.lj.internal.coupons.domain.martcap.repository.ICapMerchantRepository;
import cc.lj.internal.coupons.infrastructure.po.CapMerchantPO;
import cc.lj.internal.coupons.interfaces.dto.command.CapMerchantClearValueCommand;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;

@Repository("capMerchantRepository")
public class CapMerchantRepositoryImpl implements ICapMerchantRepository {

    @Resource(name = "mysqlCapMerchantRepository")
    private ICapMerchantRepository merchantRepository;

    @Override
    public Integer updateClearValue(CapMerchantClearValueCommand capMerchantClearValueCommand) {
        return merchantRepository.updateClearValue(capMerchantClearValueCommand);
    }

    @Override
    public Integer getValueSum(CapMerchantPO capMerchantPO) {
        return merchantRepository.getValueSum(capMerchantPO);
    }

    @Override
    public Integer insert(CapMerchantPO entityPO) {
        return merchantRepository.insert(entityPO);
    }

    @Override
    public PageInfo<CapMerchantPO> selectPage(PageParam pageParam) {
        return merchantRepository.selectPage(pageParam);
    }

    @Override
    public Integer deleteById(Integer id) {
        return merchantRepository.deleteById(id);
    }

    @Override
    public CapMerchantPO getById(Integer id) {
        return merchantRepository.getById(id);
    }

    @Override
    public Integer updateById(CapMerchantPO capMerchantPO) {
        return merchantRepository.updateById(capMerchantPO);
    }

    @Override
    public List<CapMerchantPO> getList(CapMerchantPO capMerchantPO) {
        return merchantRepository.getList(capMerchantPO);
    }
}
